#include "directory.h"

int concatenate_path(char *cwd, const char *cat_path);

int cd(MYSQL *db, const char *username, char *cwd, const char *cat_path);

//==============================ls exist=================================//
// SELECT tomb FROM file_system WHERE user = username AND path = path;
int file_exist(MYSQL *db, const char *username, const char *path);

// SELECT filename FROM file_system WHERE user = username AND prepath = path;
int ls(MYSQL *db, const char *username, const char *path, char *output);

//===========================mkdir rmdir rm===============================//
// INSERT INTO (user, type, name, path, prepath) VALUES (username, 'd', dirname, cwd/filename, cwd);
int create_directory(MYSQL *db, const char *username, const char *dirname, const char *cwd);

// UPDATE file_system SET tomb = 1 WHERE user = username AND path = path;
int remove_directroy(MYSQL *db, const char *username, const char *path);

// UPDATE file_system SET tomb = 1 WHERE user = username AND path = path;
int remove_file(MYSQL *db, const char *username, const char *path);
